<template>
  <div>
      count:{{count}}
      <a-button @click="increment">点击</a-button>
      {{message}}
      <MyButton @click="handleOk">OK</MyButton>
  </div>
</template>

<script>
import {mapState,mapMutations,mapGetters, mapActions} from 'vuex'
import MyButton from '../components/MyButton.vue'
export default {
    computed:{
        ...mapState(['count']),
        ...mapGetters(['message'])
    },
    methods:{
        ...mapActions(['increment']),
        ...mapMutations(['increment']),
        handleOk(){
            console.log('ok');
        }
    },
    components:{
        MyButton
    }
}
</script>

<style>

</style>